How to make a normal user can install package with `pkg_add` on FreeBSD?

Posted by Eonil on Server Fault See other posts from Server Fault or by Eonil
Published on 2011-02-27T05:32:02Z Indexed on 2011/02/27 7:26 UTC
Read the original article Hit count: 560

Filed under:
|
|
|
|

How to make a normal user can install package with pkg_add on FreeBSD?

pkg_add -r command fails with normal user with sudo. Downloading succeeds, but installation fails with this error message. Equal command executed successfully with root login.

%sudo pkg_add -r apache22
Password:
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.1-release/Latest/apache22.tbz: Syntax error, command unrecognized
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.1-release/Latest/apache22.tbz' by URL
%

Assume my username as eonil.

I added

eonil ALL=(ALL) ALL

code as next of

root ALL=(ALL) ALL

via visudo, and added the user to wheel group by

pw usermod eonil -G wheel

. But the user cannot install package with sudo pkg_add -r apache22. (not only the apache, any package.)

© Server Fault or respective owner

Related posts about freebsd

Related posts about install